home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Applications / Moscow ML 1.31 / source code / mosml / src / launch / Makefile < prev    next >
Encoding:
Makefile  |  1996-07-03  |  1.0 KB  |  44 lines  |  [TEXT/R*ch]

  1. # Unix Makefile for launching Moscow ML
  2. # Based on the Caml Light (copyright 1993 INRIA)
  3.  
  4. include ../Makefile.inc
  5.  
  6. all: mosmlc mosml camlexec testprog 
  7.  
  8. # header cannot be generated until camlrunm is installed in $(BINDIR)...
  9.  
  10. install:
  11.     (echo "#!$(BINDIR)/camlrunm"; \
  12.      echo "exit 2"; \
  13.      cat testprog) > /tmp/testscr
  14.     chmod a+x /tmp/testscr
  15.     sh -c 'if sh -c /tmp/testscr 2>/dev/null; \
  16.                then echo "#!$(BINDIR)/camlrunm" > $(LIBDIR)/header; \
  17.                else cp camlexec $(LIBDIR)/header; \
  18.                fi'
  19.     rm -f /tmp/testscr
  20.     for script in mosml mosmlc; do \
  21.       cp $$script $(BINDIR)/$$script; \
  22.       chmod a+x $(BINDIR)/$$script; \
  23.     done
  24.  
  25. mosmlc: mosmlc.tpl
  26.     sed -e "s|LIBDIR|$(LIBDIR)|" mosmlc.tpl > mosmlc
  27.  
  28. mosml: mosml.tpl
  29.     sed -e "s|LIBDIR|$(LIBDIR)|" mosml.tpl > mosml
  30.  
  31. testprog: testprog.sml
  32.     $(MOSMLC) testprog.sml
  33.     $(MOSMLL) -noheader -o testprog BasicIO.uo testprog.uo
  34.  
  35. camlexec: camlexec.c
  36.     $(CC) $(OPTS) -o camlexec camlexec.c
  37.     $(STRIP) camlexec
  38.  
  39. clean:
  40.     rm -f camlexec mosmlc mosml testprog testprog.u[io]
  41.  
  42. depend:
  43.  
  44.